-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement file index provider #98
base: master
Are you sure you want to change the base?
Conversation
This powers VSCode's built-in fuzzy file finder.
@@ -31,7 +31,7 @@ export async function calculateActualConfig(config: FileSystemConfig): Promise<F | |||
config.host = replaceVariables(config.host); | |||
const port = replaceVariables((config.port || '') + ''); | |||
if (port) config.port = Number(port); | |||
config.agent = replaceVariables(config.agent); | |||
config.agent = replaceVariables(config.agent) || process.env.SSH_AUTH_SOCK; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't thought of using this variable, but it's a good idea. If you want, you can make this a separate PR, or let me commit it myself.
|
||
public async provideFileIndex(options: vscode.FileSearchOptions, token: vscode.CancellationToken): Promise<vscode.Uri[]> { | ||
const name = this.config.label || this.config.name; | ||
const command = `find ${this.relative(options.folder.path)} -print0`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you checked whether this command and syntax is available on all distros that support SFTP?
Hey @benesch have you been able to build a version of this plugin with this new search implementation yet? I'd be really great if you could provide us a .vsix package! |
I haven't the time, I'm afraid. You'll have to go it yourself. |
2b9e766
to
284e02f
Compare
fa8c015
to
9be6aa0
Compare
This powers VSCode's built-in fuzzy file finder.
The approach taken is to execute
find
on the remote machine. This is more efficient than the implementation on the insiders branch, which uses SFTP.This implements part of #2. I'm not actually proposing that this be merged yet, since sadly the file finding APIs are still experimental.